package com.zqu.service.impl;

import com.zqu.mapper.ServeMapper;
import com.zqu.pojo.Serve;
import com.zqu.service.ServeService;
//import org.assertj.core.error.ShouldContainValues;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ServeServiceImpl implements ServeService {
    @Autowired(required = false)
    private ServeMapper serveMapper;

    @Override
    public List<Serve> selectList(Serve serve) {
        return serveMapper.selectList(serve);
    }

    @Override
    public boolean insertT(Serve serve) {
        int flag = serveMapper.insertT(serve);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean updateT(Serve serve) {
        int flag = serveMapper.updateT(serve);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteT(long id) {
        int flag = serveMapper.deleteT(id);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteTByIds(String[] ids) {
        int flag = serveMapper.deleteTByIds(ids);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public Serve findServe(long id) {
        return serveMapper.selectTById(id);
    }
}
